package com.yerbamateprimer.service;

import com.yerbamateprimer.model.User;
import com.yerbamateprimer.round.Round;

/**
 * This interface defines a service
 * useful to manage (CRUD) the
 * yerba mate rounds.
 * 
 * @author Matias Liwski
 * @version 1.0
 */
public interface RoundService {
	/**
	 * @return A free round or a new one if there's none free. 
	 */
	Round getNewRound();
	
	/** 
	 * @param round The round to release.
	 */
	void releaseRound(Round round);

	/**
	 * @param user The user to register.
	 * @param round The round to register.
	 */
	void registerUserAtRound(User user, Round round);

	/**
	 * @param user The user to unregister.
	 */
	void unregisterUserFromRound(User user);

	/**
	 * @param user The user to search for a round.
	 * @return The round for the provided user.
	 */
	Round getRoundForUser(User user);	
}